<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<script>

    var arr=[1,3,44,55,64,26,78,98,51,48];

    function sort(array) {
        for(var i=0;i<array.length;i++){
            for (var j=i+1;j<array.length;j++){
                var temp = '';
                if(array[i]>array[j]){
//                    array[i] = array[j];
//                    array[j] = temp;
//                    temp = array[i];

                    temp=array[i];
                    array[i]=array[j];
                    array[j]=temp
                }
            }
        }
        return array
    }

    console.log(sort(arr));

</script>
</body>
</html>